import { companySize, FinanceStage, SkuStatus, UserSex, Education, Year } from "../../types"
import { Tag } from "antd"

export function toFontCompanySize(num: companySize = -1) {
  switch (num) {
    case companySize.unlimit:
      return <Tag>不限</Tag>
    case companySize.lessTwenty:
      return <Tag>0-20人</Tag>
    case companySize.lessOhundred:
      return <Tag>20-99人</Tag>
    case companySize.lessFhundred:
      return <Tag>100-499人</Tag>
    case companySize.lessOthousand:
      return <Tag>500-999人</Tag>
    case companySize.lessTthousand:
      return <Tag>1000-9999人</Tag>
    case companySize.moreTthousand:
      return <Tag>10000人以上</Tag>
    default:
      return
  }
}

export function toFontFinanceStage(num: FinanceStage = -1) {
  switch (num) {
    case FinanceStage.unlimit:
      return <Tag>不限</Tag>
    case FinanceStage.Unfunded:
      return <Tag>未融资</Tag>
    case FinanceStage.angelwheel:
      return <Tag>天使轮</Tag>
    case FinanceStage.awheel:
      return <Tag>A轮</Tag>
    case FinanceStage.bwheel:
      return <Tag>B轮</Tag>
    case FinanceStage.cwheel:
      return <Tag>C轮</Tag>
    case FinanceStage.dwheel:
      return <Tag>D轮及以上</Tag>
    case FinanceStage.listed:
      return <Tag>已上市</Tag>
    case FinanceStage.noFinancing:
      return <Tag>不需要融资</Tag>
    default:
      return
  }
}

export function toFontStatus(value: SkuStatus = -1) {
  if (value === SkuStatus.Normal) return <Tag color='green'>正常</Tag>
  else return <Tag color='red'>禁用</Tag>
}

export function toFontSex(value: UserSex = -1) {
  if (value === UserSex.man) return <Tag color='blue'>男</Tag>
  else return <Tag color='red'>女</Tag>
}

export function toFontEducation(num: Education = -1) {
  switch (num) {
    case Education.unlimit: return <Tag>不限</Tag>
    case Education.junior: return <Tag>初中及以下</Tag>
    case Education.secondary: return <Tag>中专/中技</Tag>
    case Education.highSchool: return <Tag>高中</Tag>
    case Education.juniorCollege: return <Tag>大专</Tag>
    case Education.undergraduate: return <Tag>本科</Tag>
    case Education.master: return <Tag>硕士</Tag>
    case Education.doctor: return <Tag>博士</Tag>
    default:
      return
  }
}

export function toFontYear(num: Year = -1) {
  switch (num) {
    case Year.unlimit: return <Tag>不限</Tag>
    case Year.enrollment: return <Tag>在校生</Tag>
    case Year.fresh: return <Tag>应届生</Tag>
    case Year.withinOne: return <Tag>1年以内</Tag>
    case Year.WithinThree: return <Tag>1-3年</Tag>
    case Year.WithinFive: return <Tag>3-5年</Tag>
    case Year.Withinten: return <Tag>5-10年</Tag>
    case Year.decade: return <Tag>十年以上</Tag>
    default:
      return
  }
}
